package untiring07.mvc.dao;

import mybatis3.helper.MVCSqlSessionFactory;

import org.apache.ibatis.session.SqlSession;

import untiring07.mvc.model.MemberVO;

public class MemberDAO {

	public static boolean login(String uid, String pwd){
		boolean result = false;
		SqlSession sess = null;
		MemberVO mvo = new MemberVO();
		mvo.setUid(uid);
		mvo.setPwd(pwd);
		try{
			sess = MVCSqlSessionFactory.openSession();
			int i = sess.selectOne("MemberMapper.loginSQL", mvo);
			if(i>0)
			result = true;
		}finally{
			sess.close();
		}
		return result;
	}
	
	
}
